package com.f5.management.dao;

import com.f5.management.entity.AdminUser;
import com.f5.management.entity.dto.AdminUserAndRoleDto;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @ClassName AdminUserDAO
 * @Description 查询管理用户信息的DAO接口层
 * @Author 吴
 * @Date 2021/4/1 21:03
 * @Version 1.0
 **/

@Mapper
@Repository
public interface AdminUserDAO {
    //查询一个管理用户
    public AdminUser getAdminUser(String account);

    //根据时间查询用户角色和权限 (模糊查询)
    public  List<AdminUser> getAdminUserLists(@Param("adminDto")AdminUserAndRoleDto adminDto);

    //添加一个用户
    public  void insertAdminUser(@Param("adminUser")AdminUser adminUser);

    //修改用户的状态
    public  void updateAdminUserState(@Param("adminUser")AdminUser adminUser);

    //添加一个用户角色关联表
    public  void insertUserRole(@Param("uid")long  uid,@Param("rid")long rid);

    //查询用户主键
    public long selectId(String account);

    //假删除功能
    public void deleteAccount(String account);

    //查询功能
    public String selectAccount(String account);




}
